cc.Class({
    extends: cc.Component,

    properties: {

    },



    // onLoad () {},

    start() {
        let firstPosition;
        this.node.on(cc.Node.EventType.TOUCH_START, function () {
            this.node.opacity = 160;
            this.node.zIndex = 100;
            firstPosition = this.node.position;
        }.bind(this));
        this.node.on(cc.Node.EventType.TOUCH_MOVE, function (event) {
            this.node.opacity = 160;
            var delta = event.touch.getDelta();
            this.node.x += delta.x;
            this.node.y += delta.y;
        }.bind(this));
        this.node.on(cc.Node.EventType.TOUCH_END, function () {
            this.node.opacity = 255;
            this.node.zIndex = 0;
            cc.director.emit("homeImgTouchEnd", {
                firstPosition: firstPosition,
                node: this.node
            });
        }.bind(this));
    },

    // update (dt) {},
});